package com.lxyk.config;


import com.lxyk.dao.impl.AnnimalsDaoImpl;
import com.lxyk.pojo.Annimals;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/*
* 淳注解配置,没有xml文件
* */
@Configuration//代表配置类
@ComponentScan("com.lxyk")
@EnableAspectJAutoProxy  //表示开启AOP注解驱动
public class MyConfig {

    @Bean
    public Annimals getAnnimals()
    {
        return new Annimals();
    }

    @Bean()
    public AnnimalsDaoImpl getAnnimalsDaoImp()
    {
        return new AnnimalsDaoImpl();

    }


}
